<template>
  <div>
    <!-- 面包屑导航区域 -->
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>商品管理</el-breadcrumb-item>
    </el-breadcrumb>
    <!-- 卡片视图区域 -->
    <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
  <el-menu-item index="1">商品管理</el-menu-item>
  <el-menu-item index="1-1"><el-button @click="changeModel">商品添加</el-button></el-menu-item>
  <el-submenu index="2">
    <template slot="title">分类管理</template>
    <el-menu-item index="2-1">选项1</el-menu-item>
    <el-menu-item index="2-2">选项2</el-menu-item>
    <el-menu-item index="2-3">选项3</el-menu-item>
    <el-submenu index="2-4">
      <template slot="title">选项4</template>
      <el-menu-item index="2-4-1">选项1</el-menu-item>
      <el-menu-item index="2-4-2">选项2</el-menu-item>
      <el-menu-item index="2-4-3">选项3</el-menu-item>
    </el-submenu>  
  </el-submenu>
   <el-menu-item index="1-9">搜索</el-menu-item>
  <el-menu-item index="2-6"><el-button @click="changeModel">切换查看</el-button></el-menu-item>
</el-menu>
<div>
 <div class="modelA" >
    <div v-for="i in 8" v-bind:key="i" class="modelAson">
        <div class="modelA1">
        <img  src="../../imgs/timo.jpg">
        <span class="price">￥29.9</span>
            <span class="goodname">物品名称</span>
            <span class="icon">
                <a href="#">
                    <i class="fa fa-pencil-square-o" aria-hidden="true"></i>
                </a>
                <a href="#">
                    <i class="fa fa-trash-o" aria-hidden="true"></i>
                </a>
            </span>
        </div>
     </div>
 </div>
  <div class="modelB" v-show="!this.isSeen">
    <div class="modelBson" v-for="i in 8" v-bind:key="i">
        <img src="../../imgs/timo.jpg">
        <span class="title">货品名称货品名称货品名称</span>
        <span class="price">￥29.99</span>
        <span class="status">拣货中</span>
        <span class="icon">
            <a href="#">
                <i class="fa fa-pencil-square-o" aria-hidden="true"></i>
            </a>
            <a href="#">
                <i class="fa fa-trash-o" aria-hidden="true"></i>
            </a>
        </span>
    </div>
</div>
</div>
</div>
</template>
<script>
export default {
    data() {
       
        return {
           
        }
    },
    methods: {
        changeModel() {
            var consa = document.getElementsByClassName("modelA");
             var consb = document.getElementsByClassName("modelB");
            //  console.log(consa.style.display);
            if(consa[0].style.display==="none"){
                consa[0].style.display="block"
                consb[0].style.display="none"
            }else{
               consa[0].style.display="none"
                consb[0].style.display="block"
            }
            // console.log(consa.style.display);
        }
    }
}
</script>

<style lang="less" scoped>
.modelB {
    /* border: 2px solid rgb(67, 6, 209); */
    height: 100%;
    border-radius: 14%;
    display: none;
}
.modelB .modelBson[data-v-39dc465e] {
    position: relative;
    top: 3%;
    width: 58%;
    height: 16%;
    margin-top: 26px;
    background-color: whitesmoke;
}
.modelBson .icon {

    position: relative;
    left: 64%;
    top: -35%;
    font-size: 25px;

}

.modelBson .status {

    position: relative;
    top: -43%;
    left: 48%;
}

.modelBson .price {

    left: 37%;
    top: -43%;
    position: relative;
}

.modelB .modelBson .title {
    position: relative;
    top: -50%;
    left: 20%;
}

.modelB .modelBson {
    position: relative;
    top: 3%;
    width: 100%;
    height: 15%;
    margin-top: 22px;
    background-color: whitesmoke;
}

.modelB .modelBson img {
    width: 7%;
    position: relative;
    left: 3%;
    border-radius: 14%;
    overflow: hidden;
}

.modelAson img {
    width: 70%;
    position: relative;
    margin: 10%;
    /* border: 1px solid pink; */
}

.modelAson {
    width: 20%;
    height: 40%;
    /* border: 1px solid wheat; */
    float: left;
    margin: 25px;
    background-color: whitesmoke;
}
.el-main[data-v-8dc7cce2] {
    background-color: #E9EEF3;
    color: #333;
    text-align: center;
    line-height: 24px;
}
</style>
